function double(n){
	return n > 9 ? '' + n : '0' + n;
}
module.exports = {
	time2date: function(timestamp) {
		var oDate = new Date();
		oDate.setTime(timestamp * 1000)
		return oDate.getFullYear() + '-' + double(oDate.getMonth() + 1) + '-' + double(oDate.getDate()) +
		' ' + double(oDate.getHours()) + ':' + double(oDate.getMinutes()) + ':' + double(oDate.getSeconds())
	}
}